package com.zy.cat.entity.game;


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Index;
import javax.persistence.Table;

import org.springframework.beans.BeanUtils;

import com.alibaba.fastjson.JSON;
import com.zy.cat.entity.primary.CardDrawEntryInfoPrimary;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @info 9趣猫刮刮卡条目实体类
 * @author Link
 * @date 2019-10-30 09:14
 */
@Entity
@Table(name = "zy_cat_game_card_entry_info", indexes = {
		@Index(name = "pid", columnList = "pid"),
		@Index(name = "code", columnList = "code")})
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("9趣猫刮刮卡条目实体类")
@IdClass(CardDrawEntryInfoPrimary.class)
public class CardDrawEntryInfo{
	
	@Id
	@Column(columnDefinition = "VARCHAR(20) NOT NULL  COMMENT '用户账号ID[9趣猫刮刮卡每日数据记录实体类]'")
	@ApiModelProperty(value = "用户账号ID", example = "fe53d6a4fa29641")
	private String pid;
	
	@Id
	@Column(columnDefinition = "VARCHAR(10) NOT NULL  COMMENT '刮刮卡游戏条目key'")
	@ApiModelProperty(value = "刮刮卡游戏条目key", example = "1001")
	private String code;

	@Column(name = "cid",columnDefinition = "INT(32) DEFAULT NULL COMMENT '配置条目id'")
	@ApiModelProperty(value = "配置条目id", example = "110")
	private Integer cid;
	
	@Column(columnDefinition = "INT(5) DEFAULT '0' COMMENT '今日刮卡数'")
	@ApiModelProperty(value = "今日刮卡数", example = "1")
	private int gcards;
	
	@Column(columnDefinition = "INT(10) DEFAULT '0' COMMENT '刮刮卡状态,0-不可挂，1可刮'")
	@ApiModelProperty(value = "刮刮卡状态,0-不可挂，1可刮", example = "1")
	private int status;
	
	@Column(columnDefinition = "INT(10) DEFAULT '0' COMMENT '排序字段'")
	@ApiModelProperty(value = "排序字段", example = "1")
	private int sort;
	
	@Column(columnDefinition = "VARCHAR(10) NOT NULL  COMMENT '创建时间'")
	@ApiModelProperty(value = "创建时间", example = "2019-02-22")
	private String ctime;
	
	@Column(columnDefinition = "VARCHAR(20) DEFAULT '-'  COMMENT '最后更更新时间'")
	@ApiModelProperty(value = "最后更更新时间", example = "2019-02-22 10:10:10")
	private String ltime;
	
	public CardDrawEntryInfo(String pid) {
		super();
		this.pid = pid;
	}

	public CardDrawEntryInfo(String pid, String code) {
		super();
		this.pid = pid;
		this.code = code;
	}

	public CardDrawEntryInfo(CardDrawEntryInfo cardDrawEntryInfo) {
		this.pid=cardDrawEntryInfo.getPid();
		this.code=cardDrawEntryInfo.getCode();
		this.gcards=cardDrawEntryInfo.getGcards();
		this.ctime=cardDrawEntryInfo.getCtime();
		this.ltime=cardDrawEntryInfo.getLtime();
		this.status=cardDrawEntryInfo.getStatus();
		this.sort=cardDrawEntryInfo.getSort();
	}	
	
}
